import dayjs from "dayjs";

export default Vue => {
  Vue.filter("phone", phone => {
    return phone.slice(0, 3) + "****" + phone.slice(7);
  });

  Vue.filter("date", date => {
    return dayjs(date).format("YY-MM-DD");
  });

  Vue.filter("time", date => {
    return dayjs(date).format("YY-MM-DD HH:mm:ss");
  });
};
